package com.vhall.component.dao.account;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.vhall.component.entity.account.AccountEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 用户表mapper类
 *
 * @author xuyongzheng
 * @date 2021-04-06 19:01:15
 */
@Mapper
@Repository
public interface AccountMapper extends BaseMapper<AccountEntity> {

    /**
     * 查询用户数（admin）
     *
     * @param queryWrapper 查询条件
     * @return 房间数
     */
    @Select("select count(*) from account ${ew.customSqlSegment}")
    Integer countAccountForAdmin(@Param(Constants.WRAPPER) Wrapper<Object> queryWrapper);
}
